/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-08-09 14:59:01
 * @LastEditTime: 2022-08-11 10:28:43
 */

import { Form, Select, Space } from 'antd';
import Input from 'antd/lib/input/Input';
import { useEffect } from 'react';
import { useDestructionContext } from '../contexts/DestructionContext';

const PageOperate = () => {
  const { setOperate } = useDestructionContext();
  const [form] = Form.useForm();
  const onFinish = (values: any) => {
    console.log('Success:', values);
    setOperate(values.dossier);
  };

  useEffect(() => {
    setOperate('all');
  }, []);

  return (
    <div className="filter-container">
      <p className="page-title">鉴定审核列表</p>
      <Form layout="inline" form={form} onValuesChange={onFinish}>
        <Space>
          <Form.Item label="全宗" name="dossier">
            <Select defaultValue="全部" style={{ width: 120 }}>
              <Select.Option value="all">全部</Select.Option>
              <Select.Option value="1">全宗1</Select.Option>
              <Select.Option value="2">全宗2</Select.Option>
              <Select.Option value="3">全宗3</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item label="档案类型" name="recordType">
            <Select defaultValue="全部" style={{ width: 120 }}>
              <Select.Option value="all">全部</Select.Option>
              <Select.Option value="1">文书档案</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item label="申请单名称" name="applicationName">
            <Input style={{ width: 120 }}></Input>
          </Form.Item>
          <Form.Item label="申请人" name="applicant">
            <Select defaultValue="全部" style={{ width: 120 }}>
              <Select.Option value="all">全部</Select.Option>
              <Select.Option value="default">默认管理员</Select.Option>
            </Select>
          </Form.Item>
        </Space>
      </Form>
    </div>
  );
};
export default PageOperate;
